From 23417ddacefb95313733190bdde08af9bae754b9 Mon Sep 17 00:00:00 2001 From: robertl Date: Thu, 17 Jan 2008 02:25:14 +0000 Subject: [PATCH] Allow uppercase hex encoded entities in GPX. --- gpx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gpx.c b/gpx.c index 7e33d2871..20121117b 100644 --- a/gpx.c +++ b/gpx.c @@ -1355,11 +1355,12 @@ gpx_read(void) semi = strchr( badchar, ';' ); if ( semi ) { while (*hexit && *hexit != ';') { + char hc = isalpha(*hexit) ? tolower (*hexit) : *hexit; val *= 16; - val += strchr( hex, *hexit )-hex; + val += strchr( hex, hc)-hex; hexit++; } - + if ( val < 32 ) { warning( MYNAME ": Ignoring illegal character %s;\n\tConsider emailing %s at <%s>\n\tabout illegal characters in their GPX files.\n", badchar, gpx_author?gpx_author:"(unknown author)", gpx_email?gpx_email:"(unknown email address)" ); memmove( badchar, semi+1, strlen(semi+1)+1 ); -- 2.30.2